using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace ICP_MS.Plugin.Experiment;

public class FormScan : Form
{
	private ExperimentDatas experiment = null;

	private ExperimentDB db = null;

	private ComboBox cbDgvEdit = null;

	private IContainer components = null;

	private GroupBox gbScanMode;

	private CheckBox chkPeakjump;

	private CheckBox chkScan;

	private CheckBox chkSurvey;

	private TableLayoutPanel tableLayoutPanel4;

	private GroupBox gbFullScan;

	private RegionSelectControl regionSelectSurvey;

	private DbufferGrid dgvSurvey;

	private TabControl tabJump;

	private TabPage pagePeakJump;

	private DbufferGrid dgvScan;

	private RegionSelectControl regionSelectScan;

	private TabPage pagePeakSetting;

	private DbufferGrid dgvPeak;

	private Label lblSweeps;

	private NumericUpDown nudMain;

	private NumericUpDown nudSurvey;

	private GroupBox gbMain;

	private Label label1;

	private DataGridViewTextBoxColumn dataGridViewTextBoxColumn1;

	private DataGridViewTextBoxColumn dataGridViewTextBoxColumn2;

	private DataGridViewTextBoxColumn dataGridViewTextBoxColumn3;

	private DataGridViewTextBoxColumn dataGridViewTextBoxColumn4;

	private DataGridViewTextBoxColumn dataGridViewTextBoxColumn5;

	private DataGridViewTextBoxColumn dataGridViewTextBoxColumn6;

	private DataGridViewTextBoxColumn dataGridViewTextBoxColumn7;

	private DataGridViewTextBoxColumn dataGridViewTextBoxColumn8;

	private DataGridViewTextBoxColumn dataGridViewTextBoxColumn9;

	private DataGridViewTextBoxColumn dataGridViewTextBoxColumn10;

	private DataGridViewTextBoxColumn dataGridViewTextBoxColumn11;

	private DataGridViewTextBoxColumn dataGridViewTextBoxColumn12;

	private DataGridViewTextBoxColumn dataGridViewTextBoxColumn13;

	private DataGridViewTextBoxColumn dataGridViewTextBoxColumn14;

	private DataGridViewTextBoxColumn dataGridViewTextBoxColumn15;

	private DataGridViewTextBoxColumn dataGridViewTextBoxColumn16;

	private DataGridViewTextBoxColumn dataGridViewTextBoxColumn17;

	private DataGridViewTextBoxColumn dataGridViewTextBoxColumn18;

	private DataGridViewTextBoxColumn colScanStart;

	private DataGridViewTextBoxColumn colScanEnd;

	private DataGridViewTextBoxColumn colScanDwell;

	private DataGridViewTextBoxColumn colScanChannel;

	private DataGridViewTextBoxColumn colScanResolution;

	private DataGridViewTextBoxColumn colScanSetting;

	private DataGridViewTextBoxColumn colSurveyStart;

	private DataGridViewTextBoxColumn colSurveyEnd;

	private DataGridViewTextBoxColumn colSurveyDwell;

	private DataGridViewTextBoxColumn colSurveyChannel;

	private DataGridViewTextBoxColumn colSurveyResolution;

	private DataGridViewTextBoxColumn colSurveySetting;

	private DataGridViewTextBoxColumn colPeakSymbol;

	private DataGridViewTextBoxColumn colPeakDwell;

	private DataGridViewTextBoxColumn colPeakChannels;

	private DataGridViewTextBoxColumn colPeakSeparation;

	private DataGridViewTextBoxColumn colPeakResolution;

	private DataGridViewTextBoxColumn colPeakSettings;

	public FormScan()
	{
		InitializeComponent();
	}

	public void SetParams(ExperimentDatas experiment, ExperimentDB db)
	{
		this.experiment = experiment;
		this.db = db;
	}

	private void FormScan_Load(object sender, EventArgs e)
	{
		base.WindowState = FormWindowState.Maximized;
		pagePeakJump.Parent = null;
		InitScans();
		ApplyEnable(null, null);
		experiment.applyEnable += ApplyEnable;
		experiment.isotopeChanged += experiment_isotopeChanged;
		ApplyResources();
		Task.Factory.StartNew(delegate
		{
			Thread.Sleep(500);
			regonSelectSurvey_RegionChanged(null, null);
		});
	}

	private void ApplyResources()
	{
		Text = Lang.Txt("FormScan.Title.Text");
		gbFullScan.Text = Lang.Txt("FormScan.GroupBox.Survey.Text");
		gbMain.Text = Lang.Txt("FormScan.GroupBox.Main.Text");
		gbScanMode.Text = Lang.Txt("FormScan.ScanMode.Text");
		label1.Text = Lang.Txt("FormScan.Columns.SweepNo.Text");
		colPeakChannels.HeaderText = Lang.Txt("FormScan.Columns.Channel.Text");
		colPeakDwell.HeaderText = Lang.Txt("FormScan.Columns.SuspendTime.Text");
		colPeakResolution.HeaderText = Lang.Txt("FormScan.Columns.Resolution.Text");
		colPeakSettings.HeaderText = Lang.Txt("FormScan.Columns.Setting.Text");
		colScanChannel.HeaderText = Lang.Txt("FormScan.Columns.Channel.Text");
		colScanDwell.HeaderText = Lang.Txt("FormScan.Columns.SuspendTime.Text");
		colScanEnd.HeaderText = Lang.Txt("FormScan.Columns.End.Text");
		colScanResolution.HeaderText = Lang.Txt("FormScan.Columns.Resolution.Text");
		colScanSetting.HeaderText = Lang.Txt("FormScan.Columns.Setting.Text");
		colScanStart.HeaderText = Lang.Txt("FormScan.Columns.Start.Text");
		colSurveyChannel.HeaderText = Lang.Txt("FormScan.Columns.Channel.Text");
		colSurveyDwell.HeaderText = Lang.Txt("FormScan.Columns.SuspendTime.Text");
		colSurveyEnd.HeaderText = Lang.Txt("FormScan.Columns.End.Text");
		colSurveyResolution.HeaderText = Lang.Txt("FormScan.Columns.Resolution.Text");
		colSurveySetting.HeaderText = Lang.Txt("FormScan.Columns.Setting.Text");
		colSurveyStart.HeaderText = Lang.Txt("FormScan.Columns.Start.Text");
		pagePeakJump.Text = Lang.Txt("FormScan.ScanMode.Peak.Text");
		pagePeakSetting.Text = Lang.Txt("FormScan.ScanMode.Jump.Text");
		chkSurvey.Text = Lang.Txt("FormScan.ScanMode.Survey.Text");
		chkScan.Text = Lang.Txt("FormScan.ScanMode.Peak.Text");
		chkPeakjump.Text = Lang.Txt("FormScan.ScanMode.Jump.Text");
		colPeakSymbol.HeaderText = Lang.Txt("FormStandard.Columns.Symbol.Text");
		colPeakSeparation.HeaderText = Lang.Txt("AddFormScan.AMUSpacing");
		label1.Text = Lang.Txt("HPLC.FormScan.Columns.Times.Text");
		lblSweeps.Text = Lang.Txt("FormScanLA.Sweeps");
	}

	private void InitScans()
	{
		Task.Factory.StartNew(delegate
		{
			regionSelectScan.DeadRegionList = experiment.DisallowedRanges;
			regionSelectSurvey.DeadRegionList = experiment.DisallowedRanges;
			AddFixedScanRegions();
			experiment.SurveyRegions = RemoveRegionList(experiment.SurveyRegions, experiment.DisallowedRanges);
			SetPeakJumpRegions();
			regionSelectSurvey.SelectedRegions = experiment.SurveyRegions;
			regionSelectScan.SelectedRegions = experiment.ScanRegions;
			Invoke((EventHandler)delegate
			{
				nudMain.Value = experiment.Scan.mainSweeps;
				nudSurvey.Value = experiment.Scan.survySweeps;
				chkSurvey.Checked = experiment.Scan.isSurvey;
				gbFullScan.Visible = chkSurvey.Checked;
				chkScan.Checked = experiment.Scan.isScan;
				chkPeakjump.Checked = experiment.Scan.isPeakjump;
				RebindSurveyData();
				RebindScanData();
				RebindPeakData();
			});
			regionSelectSurvey.MassRegionChanged += regonSelectSurvey_RegionChanged;
			regionSelectScan.MassRegionChanged += regionSelectScan_RegionChanged;
		});
		((DataGridView)(object)dgvSurvey).CurrentCellChanged += ScanSetting_CurrentCellChanged;
		((DataGridView)(object)dgvScan).CurrentCellChanged += ScanSetting_CurrentCellChanged;
		((DataGridView)(object)dgvPeak).CurrentCellChanged += ScanSetting_CurrentCellChanged;
		((DataGridView)(object)dgvSurvey).CellLeave += ScanSetting_CellLeave;
		((DataGridView)(object)dgvScan).CellLeave += ScanSetting_CellLeave;
		((DataGridView)(object)dgvPeak).CellLeave += ScanSetting_CellLeave;
	}

	private void SetSurveyRegions()
	{
		experiment.SurveyRegions.Add(new ScanRegions(0.0, 255.0, "Survey"));
	}

	private void experiment_isotopeChanged(object sender, EventArgs e)
	{
		UpdatePeakJumpRegions(sender, e);
		UpdateScanRegions(sender, e);
	}

	private void SetPeakJumpRegions()
	{
		List<PeakRegions> removeregions = new List<PeakRegions>();
		foreach (PeakRegions peakregion2 in experiment.PeakRegions)
		{
			if (experiment.Isotopes.Find((IsotopeInfos isotope) => isotope.mass == peakregion2.mass) == null)
			{
				removeregions.Add(peakregion2);
			}
		}
		for (int i = 0; i < removeregions.Count; i++)
		{
			experiment.PeakRegions.Remove(removeregions[i]);
		}
		foreach (IsotopeInfos isotope2 in experiment.Isotopes)
		{
			if (experiment.PeakRegions.Find((PeakRegions peakregion) => peakregion.symbol == isotope2.symbol) == null)
			{
				if (experiment.PeakRegions.Count > 0)
				{
					experiment.PeakRegions.Add(new PeakRegions(isotope2.symbol, isotope2.mass, experiment.PeakRegions[0].dwell, experiment.PeakRegions[0].channels));
				}
				else
				{
					experiment.PeakRegions.Add(new PeakRegions(isotope2.symbol, isotope2.mass));
				}
			}
		}
		experiment.PeakRegions.Sort((PeakRegions a, PeakRegions b) => a.mass.CompareTo(b.mass));
	}

	private void UpdatePeakJumpRegions(object sender, EventArgs e)
	{
		SetPeakJumpRegions();
		RebindPeakData();
	}

	private void ScanSetting_CurrentCellChanged(object sender, EventArgs e)
	{
		DataGridView dgv = sender as DataGridView;
		if (dgv.CurrentCell == null)
		{
			return;
		}
		int rowIndex = dgv.CurrentCell.RowIndex;
		int columnIndex = dgv.CurrentCell.ColumnIndex;
		int num = columnIndex;
		int num2 = num;
		if ((uint)(num2 - 4) > 1u)
		{
			return;
		}
		cbDgvEdit = new ComboBox();
		cbDgvEdit.DropDownStyle = ComboBoxStyle.DropDownList;
		cbDgvEdit.Parent = dgv;
		cbDgvEdit.Items.Clear();
		Rectangle rect = dgv.GetCellDisplayRectangle(columnIndex, rowIndex, cutOverflow: false);
		cbDgvEdit.Left = rect.Left;
		cbDgvEdit.Top = rect.Top;
		cbDgvEdit.Width = rect.Width;
		cbDgvEdit.Height = rect.Height;
		if (columnIndex == 4)
		{
			cbDgvEdit.Items.Add(Lang.Txt("AddFormScan.Standard"));
			cbDgvEdit.Items.Add(Lang.Txt("AddFormScan.High"));
			cbDgvEdit.Items.Add(Lang.Txt("AddFormScan.Low"));
			cbDgvEdit.SelectedItem = dgv.CurrentCell.Value.ToString();
			cbDgvEdit.SelectedIndexChanged += delegate
			{
				if (dgv == dgvSurvey)
				{
					experiment.SurveyRegions[rowIndex].resolution = cbDgvEdit.SelectedItem.ToString();
				}
				else if (dgv == dgvScan)
				{
					experiment.ScanRegions[rowIndex].resolution = cbDgvEdit.SelectedItem.ToString();
				}
				else if (dgv == dgvPeak)
				{
					experiment.PeakRegions[rowIndex].resolution = cbDgvEdit.SelectedItem.ToString();
				}
				dgv.InvalidateCell(columnIndex, rowIndex);
			};
		}
		else
		{
			cbDgvEdit.Items.Add(Lang.Txt("FormScan.None.Text"));
			cbDgvEdit.Items.Add(Lang.Txt("FormScan.Experiment.Text"));
			cbDgvEdit.SelectedItem = dgv.CurrentCell.Value.ToString();
			cbDgvEdit.SelectedIndexChanged += delegate
			{
				if (dgv == dgvSurvey)
				{
					experiment.SurveyRegions[rowIndex].settings = cbDgvEdit.SelectedItem.ToString();
				}
				else if (dgv == dgvScan)
				{
					experiment.ScanRegions[rowIndex].settings = cbDgvEdit.SelectedItem.ToString();
				}
				else if (dgv == dgvPeak)
				{
					experiment.PeakRegions[rowIndex].settings = cbDgvEdit.SelectedItem.ToString();
				}
				dgv.InvalidateCell(columnIndex, rowIndex);
			};
		}
		cbDgvEdit.Visible = true;
	}

	private void ScanSetting_CellLeave(object sender, DataGridViewCellEventArgs e)
	{
		if (cbDgvEdit != null)
		{
			cbDgvEdit.Visible = false;
			cbDgvEdit.Dispose();
		}
	}

	private void UpdateScanRegions(object sender, EventArgs e)
	{
		experiment.ScanRegions.Clear();
		AddFixedScanRegions();
		RebindScanData();
	}

	private void AddFixedScanRegions()
	{
		foreach (IsotopeInfos isotope in experiment.Isotopes)
		{
			experiment.ScanRegions.Add(new ScanRegions(isotope.mass - 0.1, isotope.mass + 0.1, "Scan"));
		}
		regionSelectScan.SelectedRegions = experiment.ScanRegions;
	}

	private void RebindSurveyData()
	{
		if (base.InvokeRequired)
		{
			Invoke((EventHandler)delegate
			{
				((DataGridView)(object)dgvSurvey).AutoGenerateColumns = false;
				if (((DataGridView)(object)dgvSurvey).DataSource == null)
				{
					((DataGridView)(object)dgvSurvey).DataSource = experiment.SurveyRegions;
				}
				else
				{
					BindingContext[((DataGridView)(object)dgvSurvey).DataSource].SuspendBinding();
					((DataGridView)(object)dgvSurvey).DataSource = null;
					((DataGridView)(object)dgvSurvey).DataSource = experiment.SurveyRegions;
					BindingContext[((DataGridView)(object)dgvSurvey).DataSource].ResumeBinding();
				}
			});
		}
		else
		{
			((DataGridView)(object)dgvSurvey).AutoGenerateColumns = false;
			if (((DataGridView)(object)dgvSurvey).DataSource == null)
			{
				((DataGridView)(object)dgvSurvey).DataSource = experiment.SurveyRegions;
				return;
			}
			BindingContext[((DataGridView)(object)dgvSurvey).DataSource].SuspendBinding();
			((DataGridView)(object)dgvSurvey).DataSource = null;
			((DataGridView)(object)dgvSurvey).DataSource = experiment.SurveyRegions;
			BindingContext[((DataGridView)(object)dgvSurvey).DataSource].ResumeBinding();
		}
	}

	private void RebindScanData()
	{
		if (base.InvokeRequired)
		{
			Invoke((EventHandler)delegate
			{
				((DataGridView)(object)dgvScan).AutoGenerateColumns = false;
				if (((DataGridView)(object)dgvScan).DataSource == null)
				{
					((DataGridView)(object)dgvScan).DataSource = experiment.ScanRegions;
				}
				else
				{
					BindingContext[((DataGridView)(object)dgvScan).DataSource].SuspendBinding();
					((DataGridView)(object)dgvScan).DataSource = null;
					((DataGridView)(object)dgvScan).DataSource = experiment.ScanRegions;
					BindingContext[((DataGridView)(object)dgvScan).DataSource].ResumeBinding();
				}
			});
		}
		else
		{
			((DataGridView)(object)dgvScan).AutoGenerateColumns = false;
			if (((DataGridView)(object)dgvScan).DataSource == null)
			{
				((DataGridView)(object)dgvScan).DataSource = experiment.ScanRegions;
				return;
			}
			BindingContext[((DataGridView)(object)dgvScan).DataSource].SuspendBinding();
			((DataGridView)(object)dgvScan).DataSource = null;
			((DataGridView)(object)dgvScan).DataSource = experiment.ScanRegions;
			BindingContext[((DataGridView)(object)dgvScan).DataSource].ResumeBinding();
		}
	}

	private void RebindPeakData()
	{
		if (base.InvokeRequired)
		{
			Invoke((EventHandler)delegate
			{
				experiment.PeakRegions.Sort((PeakRegions r1, PeakRegions r2) => r1.mass.CompareTo(r2.mass));
				((DataGridView)(object)dgvPeak).AutoGenerateColumns = false;
				if (((DataGridView)(object)dgvPeak).DataSource == null)
				{
					((DataGridView)(object)dgvPeak).DataSource = experiment.PeakRegions;
				}
				else
				{
					BindingContext[((DataGridView)(object)dgvPeak).DataSource].SuspendBinding();
					((DataGridView)(object)dgvPeak).DataSource = null;
					((DataGridView)(object)dgvPeak).DataSource = experiment.PeakRegions;
					BindingContext[((DataGridView)(object)dgvPeak).DataSource].ResumeBinding();
				}
			});
		}
		else
		{
			experiment.PeakRegions.Sort((PeakRegions r1, PeakRegions r2) => r1.mass.CompareTo(r2.mass));
			((DataGridView)(object)dgvPeak).AutoGenerateColumns = false;
			if (((DataGridView)(object)dgvPeak).DataSource == null)
			{
				((DataGridView)(object)dgvPeak).DataSource = experiment.PeakRegions;
				return;
			}
			BindingContext[((DataGridView)(object)dgvPeak).DataSource].SuspendBinding();
			((DataGridView)(object)dgvPeak).DataSource = null;
			((DataGridView)(object)dgvPeak).DataSource = experiment.PeakRegions;
			BindingContext[((DataGridView)(object)dgvPeak).DataSource].ResumeBinding();
		}
	}

	private void regonSelectSurvey_RegionChanged(object sender, EventArgs e)
	{
		experiment.SurveyRegions.Clear();
		foreach (MassRegion region in regionSelectSurvey.SelectedRegionList)
		{
			experiment.SurveyRegions.Add(new ScanRegions(region.Left, region.Right, "Survey"));
		}
		RebindSurveyData();
	}

	public List<ScanRegions> RemoveRegionList(IList<ScanRegions> surveys, IList<PointF> deads)
	{
		if (deads != null)
		{
			foreach (PointF dead in deads)
			{
				RemoveRegion(surveys, dead);
			}
			return (from a in surveys.ToList()
				orderby a.start
				select a).ToList();
		}
		return surveys.ToList();
	}

	private void RemoveRegion(IList<ScanRegions> surveys, PointF dead)
	{
		for (int i = 0; i < surveys.Count(); i++)
		{
			if (!(surveys[i].end < (double)dead.Y) && !(surveys[i].start > (double)dead.Y))
			{
				if (surveys[i].start >= (double)dead.X && surveys[i].end <= (double)dead.Y)
				{
					surveys.RemoveAt(i);
					i--;
				}
				else if (surveys[i].start >= (double)dead.X && surveys[i].end > (double)dead.Y)
				{
					surveys[i].start = dead.Y;
				}
				else if (surveys[i].start < (double)dead.X && surveys[i].end <= (double)dead.Y)
				{
					surveys[i].end = dead.X;
				}
				else if (surveys[i].start < (double)dead.X && surveys[i].end > (double)dead.Y)
				{
					surveys.Insert(i + 1, new ScanRegions(dead.Y, surveys[i].end, ""));
					surveys[i].end = dead.X;
				}
			}
		}
	}

	private void regionSelectScan_RegionChanged(object sender, EventArgs e)
	{
		experiment.ScanRegions.Clear();
		foreach (MassRegion region in regionSelectScan.SelectedRegionList)
		{
			experiment.ScanRegions.Add(new ScanRegions(region.Left, region.Right, "Scan"));
		}
		RebindScanData();
	}

	private void chkSurvey_CheckedChanged(object sender, EventArgs e)
	{
		CheckBox check = sender as CheckBox;
		if (check.Equals(chkSurvey))
		{
			experiment.Scan.isSurvey = chkSurvey.Checked;
			gbFullScan.Visible = chkSurvey.Checked;
		}
		else if (check.Equals(chkScan))
		{
			if (check.Checked)
			{
				gbMain.Visible = true;
				chkPeakjump.Checked = false;
				pagePeakJump.Parent = tabJump;
				pagePeakSetting.Parent = null;
			}
			experiment.Scan.isScan = chkScan.Checked;
		}
		else if (check.Equals(chkPeakjump))
		{
			if (chkPeakjump.Checked)
			{
				gbMain.Visible = true;
				chkScan.Checked = false;
				pagePeakJump.Parent = null;
				pagePeakSetting.Parent = tabJump;
			}
			experiment.Scan.isPeakjump = chkPeakjump.Checked;
		}
		if (!chkScan.Checked && !chkPeakjump.Checked)
		{
			experiment.Scan.isScan = false;
			experiment.Scan.isPeakjump = false;
			gbMain.Visible = false;
		}
	}

	private void dgvSurvey_CellValueChanged(object sender, DataGridViewCellEventArgs e)
	{
		if (e.ColumnIndex == -1 || e.RowIndex == -1)
		{
			return;
		}
		int columnIndex = e.ColumnIndex;
		int num = columnIndex;
		if ((uint)num <= 1u)
		{
			if (experiment.SurveyRegions[e.RowIndex].start < 0.0)
			{
				experiment.SurveyRegions[e.RowIndex].start = 0.0;
			}
			else if (experiment.SurveyRegions[e.RowIndex].start > 260.0)
			{
				experiment.SurveyRegions[e.RowIndex].start = 260.0;
			}
			if (experiment.SurveyRegions[e.RowIndex].end < 0.0)
			{
				experiment.SurveyRegions[e.RowIndex].end = 0.0;
			}
			else if (experiment.SurveyRegions[e.RowIndex].start > 260.0)
			{
				experiment.SurveyRegions[e.RowIndex].start = 260.0;
			}
			if (experiment.SurveyRegions[e.RowIndex].start > experiment.SurveyRegions[e.RowIndex].end)
			{
				double temp = experiment.SurveyRegions[e.RowIndex].start;
				experiment.SurveyRegions[e.RowIndex].start = experiment.SurveyRegions[e.RowIndex].end;
				experiment.SurveyRegions[e.RowIndex].end = temp;
			}
			regionSelectSurvey.SelectedRegions = experiment.SurveyRegions;
		}
	}

	private void dgvSurvey_CellLeave(object sender, DataGridViewCellEventArgs e)
	{
	}

	private void dgvSurvey_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
	{
		int columnIndex = e.ColumnIndex;
		int num = columnIndex;
		if ((uint)num <= 1u)
		{
			e.Value = $"{e.Value:0.00}";
		}
	}

	private void dgvSurvey_KeyDown(object sender, KeyEventArgs e)
	{
		if (e.KeyCode == Keys.Delete)
		{
			DeleteSurveyDatas();
		}
	}

	private void dgvSurvey_MouseDown(object sender, MouseEventArgs e)
	{
		if (e.Button == MouseButtons.Right)
		{
			ContextMenu menu = new ContextMenu();
			menu.MenuItems.Add(Lang.Txt("FormScan.Delete.Text"), delegate
			{
				DeleteSurveyDatas();
			});
			menu.Show((Control)(object)dgvSurvey, e.Location);
		}
	}

	private void DeleteSurveyDatas()
	{
		if (((DataGridView)(object)dgvSurvey).SelectedRows == null || ((DataGridView)(object)dgvSurvey).SelectedRows.Count <= 0)
		{
			return;
		}
		MassRegionList selMassRegionList = new MassRegionList();
		List<ScanRegions> selScanRegions = new List<ScanRegions>();
		foreach (DataGridViewRow row in ((DataGridView)(object)dgvSurvey).SelectedRows)
		{
			selMassRegionList.Add(regionSelectSurvey.SelectedRegionList[row.Index]);
			selScanRegions.Add(experiment.SurveyRegions[row.Index]);
		}
		foreach (MassRegion ss2 in selMassRegionList)
		{
			regionSelectSurvey.SelectedRegionList.Remove(ss2);
		}
		foreach (ScanRegions ss in selScanRegions)
		{
			experiment.SurveyRegions.Remove(ss);
		}
		RebindSurveyData();
		regionSelectSurvey.Invalidate();
	}

	private void dgvScan_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
	{
		if (e.ColumnIndex != -1 && e.RowIndex != -1)
		{
			int columnIndex = e.ColumnIndex;
			int num = columnIndex;
			if ((uint)num <= 1u)
			{
				e.Value = $"{e.Value:0.00}";
			}
		}
	}

	private void dgvScan_CellValueChanged(object sender, DataGridViewCellEventArgs e)
	{
		if (e.ColumnIndex == -1 || e.RowIndex == -1)
		{
			return;
		}
		int columnIndex = e.ColumnIndex;
		int num = columnIndex;
		if ((uint)num <= 1u)
		{
			if (experiment.ScanRegions[e.RowIndex].start < 0.0)
			{
				experiment.ScanRegions[e.RowIndex].start = 0.0;
			}
			else if (experiment.ScanRegions[e.RowIndex].start > 260.0)
			{
				experiment.ScanRegions[e.RowIndex].start = 260.0;
			}
			if (experiment.ScanRegions[e.RowIndex].end < 0.0)
			{
				experiment.ScanRegions[e.RowIndex].end = 0.0;
			}
			else if (experiment.ScanRegions[e.RowIndex].start > 260.0)
			{
				experiment.ScanRegions[e.RowIndex].start = 260.0;
			}
			if (experiment.ScanRegions[e.RowIndex].start > experiment.ScanRegions[e.RowIndex].end)
			{
				double temp = experiment.ScanRegions[e.RowIndex].start;
				experiment.ScanRegions[e.RowIndex].start = experiment.ScanRegions[e.RowIndex].end;
				experiment.ScanRegions[e.RowIndex].end = temp;
			}
			regionSelectScan.SelectedRegions = experiment.ScanRegions;
		}
	}

	private void DeleteScanRegions()
	{
		if (((DataGridView)(object)dgvScan).SelectedRows == null || ((DataGridView)(object)dgvScan).SelectedRows.Count <= 0)
		{
			return;
		}
		foreach (DataGridViewRow row in ((DataGridView)(object)dgvScan).SelectedRows)
		{
			experiment.ScanRegions.RemoveAt(row.Index);
			regionSelectScan.SelectedRegionList.RemoveAt(row.Index);
		}
		AddFixedScanRegions();
	}

	private void dgvScan_KeyDown(object sender, KeyEventArgs e)
	{
		if (e.KeyCode == Keys.Delete)
		{
			DeleteScanRegions();
		}
	}

	private void dgvScan_MouseDown(object sender, MouseEventArgs e)
	{
		if (e.Button == MouseButtons.Right)
		{
			ContextMenu menu = new ContextMenu();
			menu.MenuItems.Add(Lang.Txt("FormScan.Delete.Text"), delegate
			{
				DeleteScanRegions();
			});
			menu.Show((Control)(object)dgvScan, e.Location);
		}
	}

	private void nudSurvey_ValueChanged(object sender, EventArgs e)
	{
		experiment.Scan.survySweeps = decimal.ToInt32(nudSurvey.Value);
	}

	private void nudMain_ValueChanged(object sender, EventArgs e)
	{
		experiment.Scan.mainSweeps = decimal.ToInt32(nudMain.Value);
	}

	private void dgvPeak_CellValidated(object sender, DataGridViewCellEventArgs e)
	{
	}

	private void dgvPeak_CellValueChanged(object sender, DataGridViewCellEventArgs e)
	{
		if (e.ColumnIndex == colPeakChannels.Index && e.RowIndex >= 0)
		{
			experiment.PeakRegions[e.RowIndex].channels = experiment.PeakRegions[e.RowIndex].channels / 2 * 2 + 1;
		}
		if (experiment != null)
		{
			experiment.Dirty.PeakRegionsDirty = true;
		}
	}

	public void ApplyEnable(object sender, EventArgs e)
	{
		if (experiment.Scan.currentStatus != 0)
		{
			gbScanMode.Enabled = false;
			gbFullScan.Enabled = false;
			tabJump.Enabled = false;
			gbMain.Enabled = false;
		}
	}

	private void FormScan_FormClosing(object sender, FormClosingEventArgs e)
	{
		experiment.applyEnable -= ApplyEnable;
		experiment.isotopeChanged -= experiment_isotopeChanged;
	}

	protected override void Dispose(bool disposing)
	{
		if (disposing && components != null)
		{
			components.Dispose();
		}
		base.Dispose(disposing);
	}

	private void InitializeComponent()
	{
		//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
		//IL_00d7: Expected O, but got Unknown
		//IL_011a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0124: Expected O, but got Unknown
		//IL_0172: Unknown result type (might be due to invalid IL or missing references)
		//IL_017c: Expected O, but got Unknown
		System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
		System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
		System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
		System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
		System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
		System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
		this.gbScanMode = new System.Windows.Forms.GroupBox();
		this.chkPeakjump = new System.Windows.Forms.CheckBox();
		this.chkScan = new System.Windows.Forms.CheckBox();
		this.chkSurvey = new System.Windows.Forms.CheckBox();
		this.nudMain = new System.Windows.Forms.NumericUpDown();
		this.nudSurvey = new System.Windows.Forms.NumericUpDown();
		this.tableLayoutPanel4 = new System.Windows.Forms.TableLayoutPanel();
		this.gbFullScan = new System.Windows.Forms.GroupBox();
		this.lblSweeps = new System.Windows.Forms.Label();
		this.gbMain = new System.Windows.Forms.GroupBox();
		this.label1 = new System.Windows.Forms.Label();
		this.tabJump = new System.Windows.Forms.TabControl();
		this.pagePeakJump = new System.Windows.Forms.TabPage();
		this.pagePeakSetting = new System.Windows.Forms.TabPage();
		this.regionSelectSurvey = new ICP_MS.Plugin.Experiment.RegionSelectControl();
		this.dgvSurvey = new DbufferGrid();
		this.colSurveyStart = new System.Windows.Forms.DataGridViewTextBoxColumn();
		this.colSurveyEnd = new System.Windows.Forms.DataGridViewTextBoxColumn();
		this.colSurveyDwell = new System.Windows.Forms.DataGridViewTextBoxColumn();
		this.colSurveyChannel = new System.Windows.Forms.DataGridViewTextBoxColumn();
		this.colSurveyResolution = new System.Windows.Forms.DataGridViewTextBoxColumn();
		this.colSurveySetting = new System.Windows.Forms.DataGridViewTextBoxColumn();
		this.dgvScan = new DbufferGrid();
		this.colScanStart = new System.Windows.Forms.DataGridViewTextBoxColumn();
		this.colScanEnd = new System.Windows.Forms.DataGridViewTextBoxColumn();
		this.colScanDwell = new System.Windows.Forms.DataGridViewTextBoxColumn();
		this.colScanChannel = new System.Windows.Forms.DataGridViewTextBoxColumn();
		this.colScanResolution = new System.Windows.Forms.DataGridViewTextBoxColumn();
		this.colScanSetting = new System.Windows.Forms.DataGridViewTextBoxColumn();
		this.regionSelectScan = new ICP_MS.Plugin.Experiment.RegionSelectControl();
		this.dgvPeak = new DbufferGrid();
		this.colPeakSymbol = new System.Windows.Forms.DataGridViewTextBoxColumn();
		this.colPeakDwell = new System.Windows.Forms.DataGridViewTextBoxColumn();
		this.colPeakChannels = new System.Windows.Forms.DataGridViewTextBoxColumn();
		this.colPeakSeparation = new System.Windows.Forms.DataGridViewTextBoxColumn();
		this.colPeakResolution = new System.Windows.Forms.DataGridViewTextBoxColumn();
		this.colPeakSettings = new System.Windows.Forms.DataGridViewTextBoxColumn();
		this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
		this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
		this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
		this.dataGridViewTextBoxColumn4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
		this.dataGridViewTextBoxColumn5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
		this.dataGridViewTextBoxColumn6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
		this.dataGridViewTextBoxColumn7 = new System.Windows.Forms.DataGridViewTextBoxColumn();
		this.dataGridViewTextBoxColumn8 = new System.Windows.Forms.DataGridViewTextBoxColumn();
		this.dataGridViewTextBoxColumn9 = new System.Windows.Forms.DataGridViewTextBoxColumn();
		this.dataGridViewTextBoxColumn10 = new System.Windows.Forms.DataGridViewTextBoxColumn();
		this.dataGridViewTextBoxColumn11 = new System.Windows.Forms.DataGridViewTextBoxColumn();
		this.dataGridViewTextBoxColumn12 = new System.Windows.Forms.DataGridViewTextBoxColumn();
		this.dataGridViewTextBoxColumn13 = new System.Windows.Forms.DataGridViewTextBoxColumn();
		this.dataGridViewTextBoxColumn14 = new System.Windows.Forms.DataGridViewTextBoxColumn();
		this.dataGridViewTextBoxColumn15 = new System.Windows.Forms.DataGridViewTextBoxColumn();
		this.dataGridViewTextBoxColumn16 = new System.Windows.Forms.DataGridViewTextBoxColumn();
		this.dataGridViewTextBoxColumn17 = new System.Windows.Forms.DataGridViewTextBoxColumn();
		this.dataGridViewTextBoxColumn18 = new System.Windows.Forms.DataGridViewTextBoxColumn();
		this.gbScanMode.SuspendLayout();
		((System.ComponentModel.ISupportInitialize)this.nudMain).BeginInit();
		((System.ComponentModel.ISupportInitialize)this.nudSurvey).BeginInit();
		this.tableLayoutPanel4.SuspendLayout();
		this.gbFullScan.SuspendLayout();
		this.gbMain.SuspendLayout();
		this.tabJump.SuspendLayout();
		this.pagePeakJump.SuspendLayout();
		this.pagePeakSetting.SuspendLayout();
		((System.ComponentModel.ISupportInitialize)this.regionSelectSurvey).BeginInit();
		((System.ComponentModel.ISupportInitialize)this.dgvSurvey).BeginInit();
		((System.ComponentModel.ISupportInitialize)this.dgvScan).BeginInit();
		((System.ComponentModel.ISupportInitialize)this.regionSelectScan).BeginInit();
		((System.ComponentModel.ISupportInitialize)this.dgvPeak).BeginInit();
		base.SuspendLayout();
		this.gbScanMode.Controls.Add(this.chkPeakjump);
		this.gbScanMode.Controls.Add(this.chkScan);
		this.gbScanMode.Controls.Add(this.chkSurvey);
		this.gbScanMode.Dock = System.Windows.Forms.DockStyle.Top;
		this.gbScanMode.Location = new System.Drawing.Point(0, 0);
		this.gbScanMode.Margin = new System.Windows.Forms.Padding(4);
		this.gbScanMode.Name = "gbScanMode";
		this.gbScanMode.Padding = new System.Windows.Forms.Padding(4);
		this.gbScanMode.Size = new System.Drawing.Size(1089, 66);
		this.gbScanMode.TabIndex = 3;
		this.gbScanMode.TabStop = false;
		this.gbScanMode.Text = "扫描模式";
		this.chkPeakjump.AutoSize = true;
		this.chkPeakjump.Checked = true;
		this.chkPeakjump.CheckState = System.Windows.Forms.CheckState.Checked;
		this.chkPeakjump.Location = new System.Drawing.Point(454, 30);
		this.chkPeakjump.Margin = new System.Windows.Forms.Padding(4);
		this.chkPeakjump.Name = "chkPeakjump";
		this.chkPeakjump.Size = new System.Drawing.Size(59, 19);
		this.chkPeakjump.TabIndex = 2;
		this.chkPeakjump.Text = "跳峰";
		this.chkPeakjump.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
		this.chkPeakjump.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
		this.chkPeakjump.UseVisualStyleBackColor = true;
		this.chkPeakjump.CheckedChanged += new System.EventHandler(chkSurvey_CheckedChanged);
		this.chkScan.AutoSize = true;
		this.chkScan.Location = new System.Drawing.Point(281, 30);
		this.chkScan.Margin = new System.Windows.Forms.Padding(4);
		this.chkScan.Name = "chkScan";
		this.chkScan.Size = new System.Drawing.Size(74, 19);
		this.chkScan.TabIndex = 1;
		this.chkScan.Text = "峰扫描";
		this.chkScan.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
		this.chkScan.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
		this.chkScan.UseVisualStyleBackColor = true;
		this.chkScan.CheckedChanged += new System.EventHandler(chkSurvey_CheckedChanged);
		this.chkSurvey.AutoSize = true;
		this.chkSurvey.Location = new System.Drawing.Point(147, 30);
		this.chkSurvey.Margin = new System.Windows.Forms.Padding(4);
		this.chkSurvey.Name = "chkSurvey";
		this.chkSurvey.Size = new System.Drawing.Size(59, 19);
		this.chkSurvey.TabIndex = 0;
		this.chkSurvey.Text = "全扫";
		this.chkSurvey.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
		this.chkSurvey.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
		this.chkSurvey.UseVisualStyleBackColor = true;
		this.chkSurvey.CheckedChanged += new System.EventHandler(chkSurvey_CheckedChanged);
		this.nudMain.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
		this.nudMain.Location = new System.Drawing.Point(908, 0);
		this.nudMain.Margin = new System.Windows.Forms.Padding(4);
		this.nudMain.Maximum = new decimal(new int[4] { 1000, 0, 0, 0 });
		this.nudMain.Name = "nudMain";
		this.nudMain.Size = new System.Drawing.Size(99, 25);
		this.nudMain.TabIndex = 5;
		this.nudMain.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
		this.nudMain.Value = new decimal(new int[4] { 30, 0, 0, 0 });
		this.nudMain.ValueChanged += new System.EventHandler(nudMain_ValueChanged);
		this.nudSurvey.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
		this.nudSurvey.Location = new System.Drawing.Point(908, -1);
		this.nudSurvey.Margin = new System.Windows.Forms.Padding(4);
		this.nudSurvey.Maximum = new decimal(new int[4] { 200, 0, 0, 0 });
		this.nudSurvey.Name = "nudSurvey";
		this.nudSurvey.Size = new System.Drawing.Size(99, 25);
		this.nudSurvey.TabIndex = 4;
		this.nudSurvey.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
		this.nudSurvey.Value = new decimal(new int[4] { 1, 0, 0, 0 });
		this.nudSurvey.ValueChanged += new System.EventHandler(nudSurvey_ValueChanged);
		this.tableLayoutPanel4.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
		this.tableLayoutPanel4.ColumnCount = 1;
		this.tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50f));
		this.tableLayoutPanel4.Controls.Add(this.gbFullScan, 0, 0);
		this.tableLayoutPanel4.Controls.Add(this.gbMain, 0, 1);
		this.tableLayoutPanel4.Location = new System.Drawing.Point(3, 74);
		this.tableLayoutPanel4.Margin = new System.Windows.Forms.Padding(4);
		this.tableLayoutPanel4.Name = "tableLayoutPanel4";
		this.tableLayoutPanel4.RowCount = 2;
		this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50f));
		this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50f));
		this.tableLayoutPanel4.Size = new System.Drawing.Size(1072, 598);
		this.tableLayoutPanel4.TabIndex = 4;
		this.gbFullScan.Controls.Add(this.regionSelectSurvey);
		this.gbFullScan.Controls.Add(this.nudSurvey);
		this.gbFullScan.Controls.Add(this.lblSweeps);
		this.gbFullScan.Controls.Add((System.Windows.Forms.Control)(object)this.dgvSurvey);
		this.gbFullScan.Dock = System.Windows.Forms.DockStyle.Fill;
		this.gbFullScan.Location = new System.Drawing.Point(4, 4);
		this.gbFullScan.Margin = new System.Windows.Forms.Padding(4);
		this.gbFullScan.Name = "gbFullScan";
		this.gbFullScan.Padding = new System.Windows.Forms.Padding(4);
		this.gbFullScan.Size = new System.Drawing.Size(1064, 291);
		this.gbFullScan.TabIndex = 0;
		this.gbFullScan.TabStop = false;
		this.gbFullScan.Text = "全扫描设置";
		this.lblSweeps.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
		this.lblSweeps.AutoSize = true;
		this.lblSweeps.Location = new System.Drawing.Point(825, 2);
		this.lblSweeps.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
		this.lblSweeps.Name = "lblSweeps";
		this.lblSweeps.Size = new System.Drawing.Size(82, 15);
		this.lblSweeps.TabIndex = 3;
		this.lblSweeps.Text = "叠加次数：";
		this.gbMain.Controls.Add(this.nudMain);
		this.gbMain.Controls.Add(this.label1);
		this.gbMain.Controls.Add(this.tabJump);
		this.gbMain.Dock = System.Windows.Forms.DockStyle.Fill;
		this.gbMain.Location = new System.Drawing.Point(4, 303);
		this.gbMain.Margin = new System.Windows.Forms.Padding(4);
		this.gbMain.Name = "gbMain";
		this.gbMain.Padding = new System.Windows.Forms.Padding(4);
		this.gbMain.Size = new System.Drawing.Size(1064, 291);
		this.gbMain.TabIndex = 1;
		this.gbMain.TabStop = false;
		this.gbMain.Text = "主扫描设置";
		this.label1.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
		this.label1.AutoSize = true;
		this.label1.Location = new System.Drawing.Point(825, 2);
		this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
		this.label1.Name = "label1";
		this.label1.Size = new System.Drawing.Size(82, 15);
		this.label1.TabIndex = 5;
		this.label1.Text = "叠加次数：";
		this.tabJump.Controls.Add(this.pagePeakJump);
		this.tabJump.Controls.Add(this.pagePeakSetting);
		this.tabJump.Dock = System.Windows.Forms.DockStyle.Fill;
		this.tabJump.Location = new System.Drawing.Point(4, 22);
		this.tabJump.Margin = new System.Windows.Forms.Padding(4);
		this.tabJump.Name = "tabJump";
		this.tabJump.SelectedIndex = 0;
		this.tabJump.Size = new System.Drawing.Size(1056, 265);
		this.tabJump.TabIndex = 1;
		this.pagePeakJump.BackColor = System.Drawing.SystemColors.Control;
		this.pagePeakJump.Controls.Add((System.Windows.Forms.Control)(object)this.dgvScan);
		this.pagePeakJump.Controls.Add(this.regionSelectScan);
		this.pagePeakJump.Location = new System.Drawing.Point(4, 25);
		this.pagePeakJump.Margin = new System.Windows.Forms.Padding(4);
		this.pagePeakJump.Name = "pagePeakJump";
		this.pagePeakJump.Padding = new System.Windows.Forms.Padding(4);
		this.pagePeakJump.Size = new System.Drawing.Size(1048, 236);
		this.pagePeakJump.TabIndex = 0;
		this.pagePeakJump.Text = "峰扫描";
		this.pagePeakSetting.BackColor = System.Drawing.SystemColors.Control;
		this.pagePeakSetting.Controls.Add((System.Windows.Forms.Control)(object)this.dgvPeak);
		this.pagePeakSetting.Location = new System.Drawing.Point(4, 25);
		this.pagePeakSetting.Margin = new System.Windows.Forms.Padding(4);
		this.pagePeakSetting.Name = "pagePeakSetting";
		this.pagePeakSetting.Padding = new System.Windows.Forms.Padding(4);
		this.pagePeakSetting.Size = new System.Drawing.Size(1048, 236);
		this.pagePeakSetting.TabIndex = 1;
		this.pagePeakSetting.Text = "跳峰";
		this.regionSelectSurvey.Dock = System.Windows.Forms.DockStyle.Bottom;
		this.regionSelectSurvey.Location = new System.Drawing.Point(4, 222);
		this.regionSelectSurvey.Margin = new System.Windows.Forms.Padding(5);
		this.regionSelectSurvey.Name = "regionSelectSurvey";
		this.regionSelectSurvey.Size = new System.Drawing.Size(1056, 65);
		this.regionSelectSurvey.TabIndex = 1;
		((System.Windows.Forms.DataGridView)(object)this.dgvSurvey).AllowUserToAddRows = false;
		((System.Windows.Forms.DataGridView)(object)this.dgvSurvey).AllowUserToDeleteRows = false;
		((System.Windows.Forms.Control)(object)this.dgvSurvey).Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
		((System.Windows.Forms.DataGridView)(object)this.dgvSurvey).BackgroundColor = System.Drawing.SystemColors.Control;
		dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
		dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
		dataGridViewCellStyle1.Font = new System.Drawing.Font("Microsoft Sans Serif", 9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
		dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
		dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
		dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
		dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
		((System.Windows.Forms.DataGridView)(object)this.dgvSurvey).ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
		((System.Windows.Forms.DataGridView)(object)this.dgvSurvey).ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
		((System.Windows.Forms.DataGridView)(object)this.dgvSurvey).Columns.AddRange(this.colSurveyStart, this.colSurveyEnd, this.colSurveyDwell, this.colSurveyChannel, this.colSurveyResolution, this.colSurveySetting);
		dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
		dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window;
		dataGridViewCellStyle2.Font = new System.Drawing.Font("Microsoft Sans Serif", 9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
		dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText;
		dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
		dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
		dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
		((System.Windows.Forms.DataGridView)(object)this.dgvSurvey).DefaultCellStyle = dataGridViewCellStyle2;
		this.dgvSurvey.HorCopy = false;
		((System.Windows.Forms.Control)(object)this.dgvSurvey).Location = new System.Drawing.Point(8, 25);
		((System.Windows.Forms.Control)(object)this.dgvSurvey).Margin = new System.Windows.Forms.Padding(4);
		((System.Windows.Forms.Control)(object)this.dgvSurvey).Name = "dgvSurvey";
		((System.Windows.Forms.DataGridView)(object)this.dgvSurvey).RowHeadersWidth = 51;
		((System.Windows.Forms.DataGridView)(object)this.dgvSurvey).RowTemplate.Height = 23;
		((System.Windows.Forms.Control)(object)this.dgvSurvey).Size = new System.Drawing.Size(1048, 190);
		((System.Windows.Forms.Control)(object)this.dgvSurvey).TabIndex = 0;
		this.dgvSurvey.VerCopy = true;
		((System.Windows.Forms.DataGridView)(object)this.dgvSurvey).CellFormatting += new System.Windows.Forms.DataGridViewCellFormattingEventHandler(dgvSurvey_CellFormatting);
		((System.Windows.Forms.DataGridView)(object)this.dgvSurvey).CellLeave += new System.Windows.Forms.DataGridViewCellEventHandler(dgvSurvey_CellLeave);
		((System.Windows.Forms.DataGridView)(object)this.dgvSurvey).CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(dgvSurvey_CellValueChanged);
		((System.Windows.Forms.Control)(object)this.dgvSurvey).KeyDown += new System.Windows.Forms.KeyEventHandler(dgvSurvey_KeyDown);
		((System.Windows.Forms.Control)(object)this.dgvSurvey).MouseDown += new System.Windows.Forms.MouseEventHandler(dgvSurvey_MouseDown);
		this.colSurveyStart.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
		this.colSurveyStart.DataPropertyName = "start";
		this.colSurveyStart.HeaderText = "起始值";
		this.colSurveyStart.MinimumWidth = 6;
		this.colSurveyStart.Name = "colSurveyStart";
		this.colSurveyEnd.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
		this.colSurveyEnd.DataPropertyName = "end";
		this.colSurveyEnd.HeaderText = "终止值";
		this.colSurveyEnd.MinimumWidth = 6;
		this.colSurveyEnd.Name = "colSurveyEnd";
		this.colSurveyDwell.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
		this.colSurveyDwell.DataPropertyName = "dwell";
		this.colSurveyDwell.HeaderText = "驻留时间";
		this.colSurveyDwell.MinimumWidth = 6;
		this.colSurveyDwell.Name = "colSurveyDwell";
		this.colSurveyChannel.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
		this.colSurveyChannel.DataPropertyName = "channels";
		this.colSurveyChannel.HeaderText = "通道";
		this.colSurveyChannel.MinimumWidth = 6;
		this.colSurveyChannel.Name = "colSurveyChannel";
		this.colSurveyResolution.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
		this.colSurveyResolution.DataPropertyName = "resolution";
		this.colSurveyResolution.HeaderText = "分辨率";
		this.colSurveyResolution.MinimumWidth = 6;
		this.colSurveyResolution.Name = "colSurveyResolution";
		this.colSurveyResolution.Resizable = System.Windows.Forms.DataGridViewTriState.True;
		this.colSurveyResolution.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
		this.colSurveyResolution.Visible = false;
		this.colSurveySetting.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
		this.colSurveySetting.DataPropertyName = "settings";
		this.colSurveySetting.HeaderText = "仪器设置";
		this.colSurveySetting.MinimumWidth = 6;
		this.colSurveySetting.Name = "colSurveySetting";
		this.colSurveySetting.Resizable = System.Windows.Forms.DataGridViewTriState.True;
		this.colSurveySetting.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
		this.colSurveySetting.Visible = false;
		((System.Windows.Forms.DataGridView)(object)this.dgvScan).AllowUserToAddRows = false;
		((System.Windows.Forms.DataGridView)(object)this.dgvScan).AllowUserToDeleteRows = false;
		((System.Windows.Forms.Control)(object)this.dgvScan).Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
		((System.Windows.Forms.DataGridView)(object)this.dgvScan).BackgroundColor = System.Drawing.SystemColors.Control;
		dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
		dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Control;
		dataGridViewCellStyle3.Font = new System.Drawing.Font("Microsoft Sans Serif", 9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
		dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.WindowText;
		dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight;
		dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
		dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
		((System.Windows.Forms.DataGridView)(object)this.dgvScan).ColumnHeadersDefaultCellStyle = dataGridViewCellStyle3;
		((System.Windows.Forms.DataGridView)(object)this.dgvScan).ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
		((System.Windows.Forms.DataGridView)(object)this.dgvScan).Columns.AddRange(this.colScanStart, this.colScanEnd, this.colScanDwell, this.colScanChannel, this.colScanResolution, this.colScanSetting);
		dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
		dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Window;
		dataGridViewCellStyle4.Font = new System.Drawing.Font("Microsoft Sans Serif", 9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
		dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.ControlText;
		dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight;
		dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
		dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
		((System.Windows.Forms.DataGridView)(object)this.dgvScan).DefaultCellStyle = dataGridViewCellStyle4;
		this.dgvScan.HorCopy = false;
		((System.Windows.Forms.Control)(object)this.dgvScan).Location = new System.Drawing.Point(4, 4);
		((System.Windows.Forms.Control)(object)this.dgvScan).Margin = new System.Windows.Forms.Padding(4);
		((System.Windows.Forms.Control)(object)this.dgvScan).Name = "dgvScan";
		((System.Windows.Forms.DataGridView)(object)this.dgvScan).RowHeadersWidth = 51;
		((System.Windows.Forms.DataGridView)(object)this.dgvScan).RowTemplate.Height = 23;
		((System.Windows.Forms.Control)(object)this.dgvScan).Size = new System.Drawing.Size(1040, 169);
		((System.Windows.Forms.Control)(object)this.dgvScan).TabIndex = 4;
		this.dgvScan.VerCopy = true;
		((System.Windows.Forms.DataGridView)(object)this.dgvScan).CellFormatting += new System.Windows.Forms.DataGridViewCellFormattingEventHandler(dgvScan_CellFormatting);
		((System.Windows.Forms.DataGridView)(object)this.dgvScan).CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(dgvScan_CellValueChanged);
		((System.Windows.Forms.Control)(object)this.dgvScan).KeyDown += new System.Windows.Forms.KeyEventHandler(dgvScan_KeyDown);
		((System.Windows.Forms.Control)(object)this.dgvScan).MouseDown += new System.Windows.Forms.MouseEventHandler(dgvScan_MouseDown);
		this.colScanStart.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
		this.colScanStart.DataPropertyName = "start";
		this.colScanStart.HeaderText = "起始值";
		this.colScanStart.MinimumWidth = 6;
		this.colScanStart.Name = "colScanStart";
		this.colScanStart.ReadOnly = true;
		this.colScanEnd.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
		this.colScanEnd.DataPropertyName = "end";
		this.colScanEnd.HeaderText = "终止值";
		this.colScanEnd.MinimumWidth = 6;
		this.colScanEnd.Name = "colScanEnd";
		this.colScanEnd.ReadOnly = true;
		this.colScanDwell.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
		this.colScanDwell.DataPropertyName = "dwell";
		this.colScanDwell.HeaderText = "驻留时间";
		this.colScanDwell.MinimumWidth = 6;
		this.colScanDwell.Name = "colScanDwell";
		this.colScanChannel.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
		this.colScanChannel.DataPropertyName = "channels";
		this.colScanChannel.HeaderText = "通道";
		this.colScanChannel.MinimumWidth = 6;
		this.colScanChannel.Name = "colScanChannel";
		this.colScanResolution.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
		this.colScanResolution.DataPropertyName = "resolution";
		this.colScanResolution.HeaderText = "分辨率";
		this.colScanResolution.MinimumWidth = 6;
		this.colScanResolution.Name = "colScanResolution";
		this.colScanResolution.Visible = false;
		this.colScanSetting.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
		this.colScanSetting.DataPropertyName = "settings";
		this.colScanSetting.HeaderText = "仪器设置";
		this.colScanSetting.MinimumWidth = 6;
		this.colScanSetting.Name = "colScanSetting";
		this.colScanSetting.Visible = false;
		this.regionSelectScan.Dock = System.Windows.Forms.DockStyle.Bottom;
		this.regionSelectScan.Location = new System.Drawing.Point(4, 167);
		this.regionSelectScan.Margin = new System.Windows.Forms.Padding(5);
		this.regionSelectScan.Name = "regionSelectScan";
		this.regionSelectScan.Size = new System.Drawing.Size(1040, 65);
		this.regionSelectScan.TabIndex = 3;
		((System.Windows.Forms.DataGridView)(object)this.dgvPeak).AllowUserToAddRows = false;
		((System.Windows.Forms.DataGridView)(object)this.dgvPeak).AllowUserToDeleteRows = false;
		((System.Windows.Forms.DataGridView)(object)this.dgvPeak).BackgroundColor = System.Drawing.SystemColors.Control;
		dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
		dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Control;
		dataGridViewCellStyle5.Font = new System.Drawing.Font("Microsoft Sans Serif", 9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
		dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.WindowText;
		dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight;
		dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
		dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
		((System.Windows.Forms.DataGridView)(object)this.dgvPeak).ColumnHeadersDefaultCellStyle = dataGridViewCellStyle5;
		((System.Windows.Forms.DataGridView)(object)this.dgvPeak).ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
		((System.Windows.Forms.DataGridView)(object)this.dgvPeak).Columns.AddRange(this.colPeakSymbol, this.colPeakDwell, this.colPeakChannels, this.colPeakSeparation, this.colPeakResolution, this.colPeakSettings);
		dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
		dataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Window;
		dataGridViewCellStyle6.Font = new System.Drawing.Font("Microsoft Sans Serif", 9f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 134);
		dataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.ControlText;
		dataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight;
		dataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
		dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
		((System.Windows.Forms.DataGridView)(object)this.dgvPeak).DefaultCellStyle = dataGridViewCellStyle6;
		((System.Windows.Forms.Control)(object)this.dgvPeak).Dock = System.Windows.Forms.DockStyle.Fill;
		this.dgvPeak.HorCopy = false;
		((System.Windows.Forms.Control)(object)this.dgvPeak).Location = new System.Drawing.Point(4, 4);
		((System.Windows.Forms.Control)(object)this.dgvPeak).Margin = new System.Windows.Forms.Padding(4);
		((System.Windows.Forms.Control)(object)this.dgvPeak).Name = "dgvPeak";
		((System.Windows.Forms.DataGridView)(object)this.dgvPeak).RowHeadersWidth = 51;
		((System.Windows.Forms.DataGridView)(object)this.dgvPeak).RowTemplate.Height = 23;
		((System.Windows.Forms.Control)(object)this.dgvPeak).Size = new System.Drawing.Size(1040, 228);
		((System.Windows.Forms.Control)(object)this.dgvPeak).TabIndex = 1;
		this.dgvPeak.VerCopy = true;
		((System.Windows.Forms.DataGridView)(object)this.dgvPeak).CellValidated += new System.Windows.Forms.DataGridViewCellEventHandler(dgvPeak_CellValidated);
		((System.Windows.Forms.DataGridView)(object)this.dgvPeak).CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(dgvPeak_CellValueChanged);
		this.colPeakSymbol.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
		this.colPeakSymbol.DataPropertyName = "symbol";
		this.colPeakSymbol.HeaderText = "符号";
		this.colPeakSymbol.MinimumWidth = 6;
		this.colPeakSymbol.Name = "colPeakSymbol";
		this.colPeakSymbol.ReadOnly = true;
		this.colPeakDwell.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
		this.colPeakDwell.DataPropertyName = "dwell";
		this.colPeakDwell.HeaderText = "驻留时间";
		this.colPeakDwell.MinimumWidth = 6;
		this.colPeakDwell.Name = "colPeakDwell";
		this.colPeakChannels.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
		this.colPeakChannels.DataPropertyName = "channels";
		this.colPeakChannels.HeaderText = "通道";
		this.colPeakChannels.MinimumWidth = 6;
		this.colPeakChannels.Name = "colPeakChannels";
		this.colPeakSeparation.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
		this.colPeakSeparation.DataPropertyName = "separation";
		this.colPeakSeparation.HeaderText = "AMU间隔";
		this.colPeakSeparation.MinimumWidth = 6;
		this.colPeakSeparation.Name = "colPeakSeparation";
		this.colPeakResolution.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
		this.colPeakResolution.DataPropertyName = "resolution";
		this.colPeakResolution.HeaderText = "分辨率";
		this.colPeakResolution.MinimumWidth = 6;
		this.colPeakResolution.Name = "colPeakResolution";
		this.colPeakSettings.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
		this.colPeakSettings.DataPropertyName = "settings";
		this.colPeakSettings.HeaderText = "仪器设置";
		this.colPeakSettings.MinimumWidth = 6;
		this.colPeakSettings.Name = "colPeakSettings";
		this.colPeakSettings.Visible = false;
		this.dataGridViewTextBoxColumn1.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
		this.dataGridViewTextBoxColumn1.DataPropertyName = "start";
		this.dataGridViewTextBoxColumn1.HeaderText = "起始值";
		this.dataGridViewTextBoxColumn1.MinimumWidth = 6;
		this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
		this.dataGridViewTextBoxColumn2.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
		this.dataGridViewTextBoxColumn2.DataPropertyName = "end";
		this.dataGridViewTextBoxColumn2.HeaderText = "终止值";
		this.dataGridViewTextBoxColumn2.MinimumWidth = 6;
		this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
		this.dataGridViewTextBoxColumn3.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
		this.dataGridViewTextBoxColumn3.DataPropertyName = "dwell";
		this.dataGridViewTextBoxColumn3.HeaderText = "驻留时间";
		this.dataGridViewTextBoxColumn3.MinimumWidth = 6;
		this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3";
		this.dataGridViewTextBoxColumn4.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
		this.dataGridViewTextBoxColumn4.DataPropertyName = "channels";
		this.dataGridViewTextBoxColumn4.HeaderText = "通道";
		this.dataGridViewTextBoxColumn4.MinimumWidth = 6;
		this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4";
		this.dataGridViewTextBoxColumn5.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
		this.dataGridViewTextBoxColumn5.DataPropertyName = "resolution";
		this.dataGridViewTextBoxColumn5.HeaderText = "分辨率";
		this.dataGridViewTextBoxColumn5.MinimumWidth = 6;
		this.dataGridViewTextBoxColumn5.Name = "dataGridViewTextBoxColumn5";
		this.dataGridViewTextBoxColumn5.Resizable = System.Windows.Forms.DataGridViewTriState.True;
		this.dataGridViewTextBoxColumn5.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
		this.dataGridViewTextBoxColumn6.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
		this.dataGridViewTextBoxColumn6.DataPropertyName = "settings";
		this.dataGridViewTextBoxColumn6.HeaderText = "仪器设置";
		this.dataGridViewTextBoxColumn6.MinimumWidth = 6;
		this.dataGridViewTextBoxColumn6.Name = "dataGridViewTextBoxColumn6";
		this.dataGridViewTextBoxColumn6.Resizable = System.Windows.Forms.DataGridViewTriState.True;
		this.dataGridViewTextBoxColumn6.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
		this.dataGridViewTextBoxColumn7.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
		this.dataGridViewTextBoxColumn7.DataPropertyName = "start";
		this.dataGridViewTextBoxColumn7.HeaderText = "起始值";
		this.dataGridViewTextBoxColumn7.MinimumWidth = 6;
		this.dataGridViewTextBoxColumn7.Name = "dataGridViewTextBoxColumn7";
		this.dataGridViewTextBoxColumn8.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
		this.dataGridViewTextBoxColumn8.DataPropertyName = "end";
		this.dataGridViewTextBoxColumn8.HeaderText = "终止值";
		this.dataGridViewTextBoxColumn8.MinimumWidth = 6;
		this.dataGridViewTextBoxColumn8.Name = "dataGridViewTextBoxColumn8";
		this.dataGridViewTextBoxColumn9.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
		this.dataGridViewTextBoxColumn9.DataPropertyName = "dwell";
		this.dataGridViewTextBoxColumn9.HeaderText = "驻留时间";
		this.dataGridViewTextBoxColumn9.MinimumWidth = 6;
		this.dataGridViewTextBoxColumn9.Name = "dataGridViewTextBoxColumn9";
		this.dataGridViewTextBoxColumn10.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
		this.dataGridViewTextBoxColumn10.DataPropertyName = "channels";
		this.dataGridViewTextBoxColumn10.HeaderText = "通道";
		this.dataGridViewTextBoxColumn10.MinimumWidth = 6;
		this.dataGridViewTextBoxColumn10.Name = "dataGridViewTextBoxColumn10";
		this.dataGridViewTextBoxColumn11.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
		this.dataGridViewTextBoxColumn11.DataPropertyName = "resolution";
		this.dataGridViewTextBoxColumn11.HeaderText = "分辨率";
		this.dataGridViewTextBoxColumn11.MinimumWidth = 6;
		this.dataGridViewTextBoxColumn11.Name = "dataGridViewTextBoxColumn11";
		this.dataGridViewTextBoxColumn12.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
		this.dataGridViewTextBoxColumn12.DataPropertyName = "settings";
		this.dataGridViewTextBoxColumn12.HeaderText = "仪器设置";
		this.dataGridViewTextBoxColumn12.MinimumWidth = 6;
		this.dataGridViewTextBoxColumn12.Name = "dataGridViewTextBoxColumn12";
		this.dataGridViewTextBoxColumn13.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
		this.dataGridViewTextBoxColumn13.DataPropertyName = "symbol";
		this.dataGridViewTextBoxColumn13.HeaderText = "符号";
		this.dataGridViewTextBoxColumn13.MinimumWidth = 6;
		this.dataGridViewTextBoxColumn13.Name = "dataGridViewTextBoxColumn13";
		this.dataGridViewTextBoxColumn13.ReadOnly = true;
		this.dataGridViewTextBoxColumn14.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
		this.dataGridViewTextBoxColumn14.DataPropertyName = "dwell";
		this.dataGridViewTextBoxColumn14.HeaderText = "驻留时间";
		this.dataGridViewTextBoxColumn14.MinimumWidth = 6;
		this.dataGridViewTextBoxColumn14.Name = "dataGridViewTextBoxColumn14";
		this.dataGridViewTextBoxColumn15.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
		this.dataGridViewTextBoxColumn15.DataPropertyName = "channels";
		this.dataGridViewTextBoxColumn15.HeaderText = "通道";
		this.dataGridViewTextBoxColumn15.MinimumWidth = 6;
		this.dataGridViewTextBoxColumn15.Name = "dataGridViewTextBoxColumn15";
		this.dataGridViewTextBoxColumn16.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
		this.dataGridViewTextBoxColumn16.DataPropertyName = "separation";
		this.dataGridViewTextBoxColumn16.HeaderText = "AMU间隔";
		this.dataGridViewTextBoxColumn16.MinimumWidth = 6;
		this.dataGridViewTextBoxColumn16.Name = "dataGridViewTextBoxColumn16";
		this.dataGridViewTextBoxColumn17.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
		this.dataGridViewTextBoxColumn17.DataPropertyName = "resolution";
		this.dataGridViewTextBoxColumn17.HeaderText = "分辨率";
		this.dataGridViewTextBoxColumn17.MinimumWidth = 6;
		this.dataGridViewTextBoxColumn17.Name = "dataGridViewTextBoxColumn17";
		this.dataGridViewTextBoxColumn18.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
		this.dataGridViewTextBoxColumn18.DataPropertyName = "settings";
		this.dataGridViewTextBoxColumn18.HeaderText = "仪器设置";
		this.dataGridViewTextBoxColumn18.MinimumWidth = 6;
		this.dataGridViewTextBoxColumn18.Name = "dataGridViewTextBoxColumn18";
		base.AutoScaleDimensions = new System.Drawing.SizeF(8f, 15f);
		base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
		base.ClientSize = new System.Drawing.Size(1089, 676);
		base.Controls.Add(this.tableLayoutPanel4);
		base.Controls.Add(this.gbScanMode);
		base.Margin = new System.Windows.Forms.Padding(4);
		base.Name = "FormScan";
		base.ShowIcon = false;
		this.Text = "FormScan";
		base.FormClosing += new System.Windows.Forms.FormClosingEventHandler(FormScan_FormClosing);
		base.Load += new System.EventHandler(FormScan_Load);
		this.gbScanMode.ResumeLayout(false);
		this.gbScanMode.PerformLayout();
		((System.ComponentModel.ISupportInitialize)this.nudMain).EndInit();
		((System.ComponentModel.ISupportInitialize)this.nudSurvey).EndInit();
		this.tableLayoutPanel4.ResumeLayout(false);
		this.gbFullScan.ResumeLayout(false);
		this.gbFullScan.PerformLayout();
		this.gbMain.ResumeLayout(false);
		this.gbMain.PerformLayout();
		this.tabJump.ResumeLayout(false);
		this.pagePeakJump.ResumeLayout(false);
		this.pagePeakSetting.ResumeLayout(false);
		((System.ComponentModel.ISupportInitialize)this.regionSelectSurvey).EndInit();
		((System.ComponentModel.ISupportInitialize)this.dgvSurvey).EndInit();
		((System.ComponentModel.ISupportInitialize)this.dgvScan).EndInit();
		((System.ComponentModel.ISupportInitialize)this.regionSelectScan).EndInit();
		((System.ComponentModel.ISupportInitialize)this.dgvPeak).EndInit();
		base.ResumeLayout(false);
	}
}
